home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / thor / ncommpollcurrent.thor < prev    next >
Text File  |  1996-11-10  |  1KB  |  54 lines

  1. /* NCommPollCurrent.thor by Troels Walsted Hansen
  2. ** $VER: NCommPollCurrent.thor v1.06 (01.11.94)
  3. **
  4. ** An ARexx script that automates NComm dialing of the
  5. ** currently hi-lighted BBS (in the Startup Window) or
  6. ** the currently open BBS.
  7. **
  8. ** IMPORTANT:  To use this script, the BBSs configured in THOR must
  9. **             have the same name as those in your NComm phonebook.
  10. **
  11. ** New: No new features for 1.06.
  12. */
  13.  
  14. options results
  15.  
  16. /* needs THOR functions */
  17.  
  18. p = ' ' || address() || ' ' || show('P',,)
  19. thorport = pos(' THOR.',p)
  20.  
  21. if thorport > 0 then thorport = word(substr(p,thorport+1),1)
  22. else
  23. do
  24.     say 'No THOR port found!'
  25.     exit 10
  26. end
  27.  
  28. address(thorport)
  29. CURRENTBBS stem CURRENT
  30.  
  31. /* Is NComm already running? If not, start it... */
  32.  
  33. if ~show('p', 'ncomm') then
  34. do
  35.     if ~exists("t:NCommStartupScript") then
  36.     do
  37.         call open(nscript, "t:NCommStartupScript", W)
  38.         call writeln(nscript, "stack 10000")
  39.         call writeln(nscript, "cd NComm:")
  40.         call writeln(nscript, "run <>nil: NComm")
  41.         call close(nscript)
  42.     end
  43.  
  44.     address command
  45.         "execute >nil: t:NCommStartupScript"
  46.         "WaitForPort ncomm"
  47.     if(rc) then exit
  48. end
  49.  
  50. address 'ncomm'
  51. NCOMMTOFRONT
  52. DIAL CURRENT.BBSNAME
  53. exit
  54.